1. Field of the Invention
This invention relates generally to flip-flops. More particularly, it relates to a dual clock D type flip-flop circuit capable of operating on two clock signals with respective two input data signals.
2. Background of Related Art
A D type flip-flop is an integrated circuit device which latches for output an input signal based on a rising or falling edge of an input clock signal. Many circuits often include a D type flip-flop, which is depicted schematically in FIG. 4.
In particular, FIG. 4 shows a schematic symbol for a conventional D type flip-flop 400. The D type flip-flop 400 includes one input signal D, an output signal Q, and one clock signal CLK. The D type flip-flop 400 further includes the ability to have its output Q preset with a predetermined condition upon reset using a preset PRE line, as well as the ability to be reset using a clear CLR line.
D type flip-flops have been in existence for decades, and have many, many uses, most typically in latching a data signal for output based on an edge of a clock signal. However, there are situations wherein it is desired to provide a single output event based on the occurrence of two input signals each having its own clock signal.
There are cases, especially in state machines and interface logic, when it is desirable to build a flip-flop device which is capable of switching on the edges of two different clocks. For instance, such a device would be useful in a state machine which is to be turned on when one particular condition holds true at the time of a first rising clock signal, e.g., on a first clock edge, and turned off when some other condition holds true at the time of a second clock signal, e.g., on a falling clock edge.
A second example of a situation for using a flip-flop inputting two separate clock signals would be if gated clocks are used for two different blocks of a device, and there is an inherent (and not very controllable) skew between the two clock signals. Then, if some signal is generated in one block and used in another block, it would be useful to set this signal based on one edge (e.g., a rising edge) of a clock signal to the first block, and resetting it on the edge of a clock signal to the second block.
Yet another example would be if an interface device needs to toggle a signal on the rising edges of two asynchronous clock signals. In this case, instead of synchronizing every input signal coming from an independently clocked device, it would be convenient to use a dual clock D flip-flop in accordance with the principles of the present invention.
There is thus a need for a D type flip-flop device which is capable of operation based on two input signals clocked independently by two clock signals.